import java.util.Scanner;

public class HomeWork {
    public static void main(String[] args) {
//        int a = 15 ;
//        int b = 10 ;
//        int max = a>b?a:b;
//        System.out.println(max);
//        if (a > b){
//            System.out.println("max="+a);
//        }else {
//            System.out.println("max="+b);
//        }
//        Scanner scanner = new Scanner(System.in);
//        System.out.println("请输入年份");
//        while (true){
//            int year = scanner.nextInt();
//            int a = year/100 ;
//            System.out.println(a);
//            double b = year%4 ;
//            if(b==0 && a*100 != year){
//                System.out.println(year+"是闰年");
//            }else if (year%400 == 0){
//                System.out.println(year+"是闰年");
//            }else {
//                System.out.println(year+"是平年");
//            }
//        }
//        while (true){
//        Scanner scanner2 = new Scanner(System.in);
//        int cj = scanner2.nextInt();
//        if (cj<=100 && cj>=90){
//            System.out.println("成绩优秀");
//        }else if(90>cj && cj>=80){
//            System.out.println("成绩良好");
//        }else if(80>cj && cj>=60){
//            System.out.println("成绩及格");
//        }else if(60>cj && cj>=0){
//            System.out.println("成绩不及格");
//        }else {
//            System.out.println("成绩不合法");
//        }
//        }
        Scanner scanner3 = new Scanner(System.in);
        System.out.println("请输入年份");
        System.out.println("请输入月份");
        int year1 = scanner3.nextInt();
        Scanner scanner4 = new Scanner(System.in);
        int month = scanner4.nextInt();
        int a = year1 / 100;
        System.out.println(a);
        double b = year1 % 4;
        int days = 0 ;
        switch (month){
            case 1 :case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12:
                days = 31;
                break;
            case 4:
            case 6:
            case 9:
            case 11:
                days = 30;
                break;
            case 2:
                if((year1%4==0 && year1%100!=0) || year1%400==0){
                    days = 29;
                }else{
                    days = 28;
                }
        }
        System.out.println(year1+"年的"+month+"月共"+days+"天");
    }
}

